<template>
<div class="content">
  <div class="statistic">
    <el-row :gutter="24">
      <el-col :span="19">
        <div class="title">实时数据</div>
        <div class="contents">
          <el-row :gutter="24">
            <el-col :span="6" v-for="(item, index) in statisticData" :key="index">
              <span class="name">{{ item.groundTypeName }}</span>
              <span class="num">{{ item.total }}</span>
            </el-col>
          </el-row>
        </div>
      </el-col>
      <el-col :span="5">
        <div class="title">帮助文档</div>
        <div class="contents">
          <el-link type="primary">操作使用指南</el-link>
        </div>
      </el-col>
    </el-row>
  </div>
  <div class="map mt40">
    <p class="title mb0">实践阵地地图</p>
  </div>
  <!-- <iframe src="http://localhost:8080/map/" frameborder="0" class="iframes"></iframe> -->
  <iframe
      src="https://wmsj.1000best.cn/map/"
      frameborder="0"
      class="iframes"
    ></iframe>
</div>
</template>

<script>
import {
  GroundController
} from "@/api";
export default {
  data() {
    return {
      statisticData: [],
    };
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      GroundController.count(this).then((res) => {
        this.statisticData = res.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.content {
    width: 98%;
    overflow: scroll !important;
    .title {
        font-size: 16px;
        font-weight: bolder;
        padding-bottom: 15px;
        border-bottom: 1px solid #ccc;
    }
    .contents {
        margin-top: 15px;
        .name {
            display: block;
        }
        .num {
            display: block;
            font-size: 16px;
            color: #999;
            margin-top: 8px;
        }
    }
    .statistic {
        height: 100px;
    }
    .iframes {
        margin-top: 10px;
        width: 100%;
        height: calc(100vh);
        overflow: scroll;
    }
}
</style>
